Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CI job for Flutter Android App #158

Merged
merged 28 commits into from
Dec 8, 2021
Merged

Add CI job for Flutter Android App #158

merged 28 commits into from
Dec 8, 2021

Conversation

d-uzlov
Copy link
Contributor

@d-uzlov d-uzlov commented Dec 7, 2021

Closes #110

Signed-off-by: Danil Uzlov <[email protected]>
Signed-off-by: Danil Uzlov <[email protected]>
Signed-off-by: Danil Uzlov <[email protected]>
Signed-off-by: Danil Uzlov <[email protected]>
Signed-off-by: Danil Uzlov <[email protected]>
Signed-off-by: Danil Uzlov <[email protected]>
@github-actions
Copy link

github-actions bot commented Dec 7, 2021

MLCommons CLA bot All contributors have signed the MLCommons CLA ✍️ ✅

Signed-off-by: Danil Uzlov <[email protected]>
Signed-off-by: Danil Uzlov <[email protected]>
Signed-off-by: Danil Uzlov <[email protected]>
@d-uzlov d-uzlov force-pushed the 110/flutter-android-ci branch from ea8a511 to cf6998b Compare December 7, 2021 09:07
Signed-off-by: Danil Uzlov <[email protected]>
Signed-off-by: Danil Uzlov <[email protected]>
@d-uzlov d-uzlov force-pushed the 110/flutter-android-ci branch from e26fbf3 to 7bdd285 Compare December 7, 2021 09:54
@d-uzlov d-uzlov marked this pull request as ready for review December 7, 2021 10:12
@d-uzlov d-uzlov requested a review from anhappdev December 7, 2021 10:14
@d-uzlov
Copy link
Contributor Author

d-uzlov commented Dec 7, 2021

@anhappdev I disabled docker buildkit for Flutter CI because for some reason it often partially rebuilds the image even when nothing changed in the dockerfile and in docker build context.
You can go to the list of avaiable tags for mlperf-mobile-android image in Google Console and see that most of the images don't have any tags. This happened because dockerfile with the same git hash was rebuilt several times, and the tag containing this hash moved to the newly built image.
Do you know anything about this and how to fix it?

@anhappdev
Copy link
Collaborator

Which docker version is used by the CI?
It seems to be a bug with docker:
moby/buildkit#1981
There is a comment that he still have the issue with the newer version, though it should be fixed.

@d-uzlov
Copy link
Contributor Author

d-uzlov commented Dec 8, 2021

Version of docker in CGP is 19.03.9, so we probably see this bug you linked.

docker/android/apk: android/docker/image
@# if the build fails with java.io.IOException: Input/output error
@# remove file android/gradle/wrapper/gradle-wrapper.jar
MSYS2_ARG_CONV_EXCL="*" docker run --rm -it --user `id -u`:`id -g` -v $(CURDIR)/..:/mnt/project mlcommons/mlperf_mobile_flutter bash -c "cd /mnt/project/flutter && make prepare-flutter && make android/apk"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This command doesn't utilize bazel cache.
I consider this command a proof that the docker container works both on CI and locally, and not a command that people should actually use to build the app.
A plan to add cache support while refactoring makefiles for #112.

flutter/Makefile Show resolved Hide resolved
flutter/Makefile Show resolved Hide resolved
@d-uzlov d-uzlov merged commit 06001d9 into master Dec 8, 2021
@d-uzlov d-uzlov deleted the 110/flutter-android-ci branch December 8, 2021 08:11
@github-actions github-actions bot locked and limited conversation to collaborators Dec 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Configure Cloud Build CI for Android Flutter app
2 participants